<template>
	<view class="home">

        <view class="" style="margin-left: 20px;margin-bottom: 20px;">
			<view class="">
			   <text style="font-weight: bold;font-size: 20px;color: dimgray;">同城活动</text>
			</view>
			
			<view class="">
			<hr style="width: 33%;">
			</view>
			
			<view class="">
			    <text style="color: gray;font-size: 13px;">{{get_text}}</text>
			</view>
			
			</view>
		
		<view class="v_list" v-for="item in swipers" :key="item.id" @click="hd_details(item.id)">
			<view class="">
				<image :src="item.pic" mode="" style="width:100%;height: 200px;"></image>
			</view>
			
			<view class="" style="text-align: center;padding: 0px 10px;font-weight: 40px;">
				<text style="color: #000000;font-size: 14px;">{{item.title}}</text>
			</view>
			
			<view class="" style="text-align: center;padding-top:8px ;">
				<text style="color: #4D4D4D;font-size: 10px;">活动时间：{{item.start_time}}~{{item.end_time}}</text>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				swipers:[],
				get_text:[]
			}
		},
		onLoad() {
			this.huodong()
		},
		methods: {
			//查看活动
			async huodong(){
				const res= await this.$myRuquest({
					url: '/index/plugin.activities/huodong'
				})
				
				if(res.data.code==200){
					this.swipers=res.data.date;
					this.get_text=res.data.get_text;
				}
			},
			 hd_details(url){
				 uni.navigateTo({
				 	url:"/pages/huodong/hd_details?id="+url
				 })
			 }
		}
	}
</script>

<style lang="scss">
	.home{
		padding-top: 20px;
		background-color: #F6F6F6;
		
		.v_list{
			
			background-color: #fff;
			margin: 0px 10px;
			height: 283px;
			border-radius: 10px;
			
			overflow: hidden;
			-ms-box-shadow:0px 3px 5px #DDDDDD;
			-moz-box-shadow:0px 3px 5px #DDDDDD;
			-webkit-box-shadow:0px 3px 5px #DDDDDD;
			box-shadow:0px 3px 5px #DDDDDD;
			
			margin-bottom: 15px;
			
			image{
				border-radius: 10px;
			}
		}
		
	}
	

</style>
